// https://leetcode.cn/problems/surrounded-regions/
// Created by ade on 2022/7/22.
//
#include <iostream>
#include <vector>


using namespace std;

class Solution {
public:
    int row = 0;
    int col = 0;
    map<int, int> myMap;

    void solve(vector <vector<char>> &board) {
        row = board.size();
        col = board[0].size();
        if (row <= 2 || col <= 2) return;
        if (check(board, row, col) == 0) return;

    }

    int check(vector <vector<char>> &board, int row, int col) {
        int flag = 0;
        for (int i = 0; i < row; i++) {
            if (board[i][0] == 'O') {
                flag = 1;
                map[i * col] = 1;
            }
            if (board[i][col - 1] == 'O') {
                flag = 1;
                map[i * col + col - 1] = 1;
            }
        }
        for (int i = 0; i < col; i++) {
            if (board[0][i] == 'O') {
                flag = 1;
                map[i * col + col - 1] = 1;
                oVec.push_back({0, i});
            }
            if (board[row - 1][i] == 'O') {
                flag = 1;
                oVec.push_back({0, i});
            }
        }
        return flag;
    }

    void back(vector <vector<char>> &board,) {}

    void show(vector <vector<char>> &board) {
        for (auto i : board) {
            for (auto j : i) {
                cout << j << ",";
            }
            cout << endl;
        }
    }
};

int main() {
    Solution so;
    auto board = {{'X', 'X', 'X', 'X'},
                  {'X', 'O', 'O', 'X'},
                  {'X', 'X', 'O', 'X'},
                  {'X', 'O', 'X', 'X'}}
    so.solve(intervals);
    cout << a << endl;
    return 0;
}